package com.dragon.design.pattern.structural.delegate.impl;

import com.dragon.design.pattern.structural.delegate.AbstractDuck;
import com.dragon.design.pattern.structural.delegate.FlyBehavior;
import com.dragon.design.pattern.structural.delegate.QuackBehavior;

/**
 * 野生鸭子
 *
 * @author dragon
 * @since 2019/11/14
 */
public class MallardDuck extends AbstractDuck {

    public MallardDuck(FlyBehavior flyBehavior, QuackBehavior quackBehavior) {
        super(flyBehavior, quackBehavior);
    }

    public MallardDuck() {
        flyBehavior = new FlyWithWings();
        quackBehavior = new Quack();
    }

    @Override
    public void display() {
        System.out.println("display white");
    }

}
